﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;

namespace HigLabo.Net.Twitter
{
    public partial class TwitterClient
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public FriendsUser GetBlocksList(GetBlocksListCommand command)
        {
            String jsonText = this.GetResultText(TwitterApiUrl.Version1_1.Blocks.GetBlocksListUrl, command);
            return new FriendsUser(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public Friends GetBlocksIds(GetBlocksIdsCommand command)
        {
            String jsonText = this.GetResultText(TwitterApiUrl.Version1_1.Blocks.GetBlocksIdsUrl, command);
            return new Friends(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        public User CreateBlocks(Int64 userID)
        {
            return CreateBlocks(new CreateBlocksCommand() { UserID = userID });
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="screenName"></param>
        /// <returns></returns>
        public User CreateBlocks(String screenName)
        {
            return CreateBlocks(new CreateBlocksCommand() { ScreenName = screenName });
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public User CreateBlocks(CreateBlocksCommand command)
        {
            String jsonText = this.GetResultText(HttpMethodName.Post, TwitterApiUrl.Version1_1.Blocks.CreateBlocksUrl, command);
            return new User(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="userID"></param>
        /// <returns></returns>
        public User DestroyBlocks(Int64 userID)
        {
            return DestroyBlocks(new DestroyBlocksCommand() { UserID = userID });
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="screenName"></param>
        /// <returns></returns>
        public User DestroyBlocks(String screenName)
        {
            return DestroyBlocks(new DestroyBlocksCommand() { ScreenName = screenName });
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public User DestroyBlocks(DestroyBlocksCommand command)
        {
            String jsonText = this.GetResultText(HttpMethodName.Post, TwitterApiUrl.Version1_1.Blocks.DestroyBlocksUrl, command);
            return new User(jsonText);
        }
    }
}
